import http from '../../utils/http'

Component({
    /**
     * 组件的属性列表
     */
    properties: {
        type: {
            type: String,
            value: '1'
        },
    },

    /**
     * 组件的初始数据
     */
    data: {
        list: []
    },

    observers: {
        'type': function (type) {
            this.getGoodsCommentList(type)
        }
    },

    /**
     * 组件的方法列表
     */
    methods: {
        async getGoodsCommentList(type) {
            let res = await http.request('http://likeshopv2.yixiangonline.com/api/order/lists?page_no=1&type=all', {}, {
                headers: {
                    token: 'd74120e227ab2c0ee5744d77a96991af'
                }
            })
            let list = res.data.list
            console.log(list);
            this.setData({ list: list })
        }

    }
})
